<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>中国象棋</title>
    <style>
        .chess-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            background-color: #f0f0f0;
            padding: 20px;
        }
        #chessboard {
            position: relative;
            border: 2px solid #000;
            background-color: #ffedcc;
        }
        .status {
            font-size: 24px;
            margin-bottom: 20px;
            font-family: KaiTi;
            font-weight: bold;
        }
        .controls {
            margin-top: 20px;
        }
        button {
            font-size: 18px;
            padding: 8px 16px;
            font-family: KaiTi;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div class="chess-container">
        <canvas id="chessboard" width="600" height="660"></canvas>
        <div class="controls">
            <button onclick="window.chessBoard.restart()">重新开始</button>
        </div>
    </div>
    <script src="ai.js"></script>
    <script src="chess.js"></script>
    <script>
        window.onload = () => {
            window.chessBoard = new ChessBoard();
        };
    </script>
</body>
</html> 